
function main( ui, hh ) {
  
  return retrieveUserPreferences();
}


function retrieveUserPreferences() {
  
  var a = EntityManager.getLoggedAccount();
  
  if( a == null  ) throw  "no user is logged!";
  
  var u = a.user;
   
  if( u == null  ) throw "user is not registerd!";
  
  return (u.preferences == null) ? "{}" : u.preferences ;
  
}

